#!/bin/bash

if [ -z $1 ]
then
  install_path=~/rocshmem
else
  install_path=$1
fi

src_path=$(dirname "$(realpath $0)")/..

cmake \
    -DCMAKE_BUILD_TYPE=Debug \
    -DCMAKE_INSTALL_PREFIX=$install_path \
    -DCMAKE_VERBOSE_MAKEFILE=ON \
    -DDEBUG=ON \
    -DPROFILE=OFF \
    -DUSE_GPU_IB=ON \
    -DUSE_DC=OFF \
    -DUSE_IPC=OFF \
    -DUSE_THREADS=OFF \
    -DUSE_WF_COAL=OFF \
    -DUSE_MANAGED_HEAP=ON \
    $src_path
cmake --build . --parallel 8
cmake --install .
